<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>

	<body>
		<div id="test">
			<button @click='ajax'>asdf</button>
		</div>
		<script src="vue.min.js"></script>
		<script src="vue-resource.min.js"></script>
		<script type="text/javascript">
			//http://www.doc00.com/doc/1001004eg 说明文档
			var app = new Vue({
				el: '#test',
				data: {

				},
				mounted: function() {

				},
				methods: {
					ajax: function() {
						console.log('asdf')
						this.$http.post("/cityBuild/index.php/Admin/Upload/cleanImage", { 'url': 'url' }, { emulateJSON: true ,headers:{'Access-Control-Allow-Origin':'sadf'}}).then(function(response) {
							if(typeof response.data == 'string') { var res = JSON.parse(response.data.substring(0, response.data.length)); } else { var res = response.data }
							if(response.status == 200) {
								if(res.code == 0) {
									console.log(res)
									vm.photos.splice(index, 1)
								}
							}
						}.bind(vm));
					}
				}
			})
		</script>
	</body>

</html>